using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Particles:MonoBehaviour {

	void OnDisable() {
		transform.parent=null;
		ParticleManager.Store(gameObject,id);
	}

	[HideInInspector] public int id;
	public static GameObject CreateParticle(string name,Vector2 position) {
		return ParticleManager.Create(ParticleManager.nameToId[name],position);
	}

}